# -*- encoding: utf-8 -*-
"""
测试算例文件(瞬态)
"""
# ====================================================================
#                        OLGA 1-14 标准算例
#                用于验证程序计算结果与OLGA软件的一致性
# ====================================================================
input_olga1 = {
    "inlet": {"V_g": None, "V_L": None, "rho_g": None, "rho_L": None, "alpha_g": None, "alpha_L": None,
              "M": {"time": [0, 40], "value": [82.75, 82.75]},
              "T": {"time": None, "value": 323.15},
              "p": {"time": None, "value": None}},
    "outlet": {"V_g": None, "V_L": None, "rho_g": None, "rho_L": None, "alpha_g": None, "alpha_L": None,
               "M": {"time": None, "value": None},
               "T": {"time": None, "value": None},
               "p": {"time": None, "value": 10532000}},
    "pipe": {"h": [-1],
             "X": [26999.99998],
             "D": 0.575,
             "eps": 0.00002,
             "K": 1},
    "environment": {"T0": 278.15},
    "cfd": {"dx": 270,
            "dt_min": 0.01,
            "dt_max": 100,
            "max_time": 2000},
    "TAB": {"tab_path": "./tests/tab_data/GXDCASE.tab"},
    "gt_path": "tests/olga_results/OLGA1.xlsx"
}

input_olga2 = {
    "inlet": {"V_g": None, "V_L": None, "rho_g": None, "rho_L": None, "alpha_g": None, "alpha_L": None,
              "M": {"time": [0,169940,170060,400000], "value": [1.5, 1.5, 2, 2]},
              "T": {"time": None, "value": 280.15},
              "p": {"time": None, "value": None}},
    "outlet": {"V_g": None, "V_L": None, "rho_g": None, "rho_L": None, "alpha_g": None, "alpha_L": None,
               "M": {"time": None, "value": None},
               "T": {"time": None, "value": None},
               "p": {"time": None, "value": 5000000}},
    "pipe": {"h": [-10],
             "X": [49999.99], 
             "D": 0.15,
             "eps": 0.0000008,
             "K": 6.5},
    "environment": {"T0": 288.15},
    "cfd": {"dx": 500,
            "dt_min": 0.01,
            "dt_max": 100,
            "max_time": 2000},
    "TAB": {"tab_path": "./tests/tab_data/gaohanye5-60.tab"},
    "gt_path": "tests/olga_results/OLGA2.xlsx"
}

input_olga3 = {
    "inlet": {"V_g": None, "V_L": None, "rho_g": None, "rho_L": None, "alpha_g": None, "alpha_L": None,
              "M": {"time": [0, 40], "value": [82.75, 82.75]},
              "T": {"time": None, "value": 323.15},
              "p": {"time": None, "value": None}},
    "outlet": {"V_g": None, "V_L": None, "rho_g": None, "rho_L": None, "alpha_g": None, "alpha_L": None,
               "M": {"time": None, "value": None},
               "T": {"time": None, "value": None},
               "p": {"time": None, "value": 10532000}},
    "pipe": {"h": [-9],
             "X": [26999.9985],
             "D": 0.575,
             "eps": 0.00002,
             "K": 1},
    "environment": {"T0": 278.15},
    "cfd": {"dx": 270,
            "dt_min": 0.01,
            "dt_max": 5,
            "max_time": 2000},
    "TAB": {"tab_path": "./tests/tab_data/GXDCASE.tab"},
    "gt_path": "tests/olga_results/OLGA3.xlsx"
}

input_olga4 = {
    "inlet": {"V_g": None, "V_L": None, "rho_g": None, "rho_L": None, "alpha_g": None, "alpha_L": None,
              "M": {"time": [0, 40], "value": [82.75, 82.75]},
              "T": {"time": None, "value": 323.15},
              "p": {"time": None, "value": None}},
    "outlet": {"V_g": None, "V_L": None, "rho_g": None, "rho_L": None, "alpha_g": None, "alpha_L": None,
               "M": {"time": None, "value": None},
               "T": {"time": None, "value": None},
               "p": {"time": None, "value": 10532000}},
    "pipe": {"h": [-74],
             "X": [26999.89859],
             "D": 0.575,
             "eps": 0.00002,
             "K": 1},
    "environment": {"T0": 278.15},
    "cfd": {"dx": 270,
            "dt_min": 0.01,
            "dt_max": 5,
            "max_time": 2000},
    "TAB": {"tab_path": "./tests/tab_data/GXDCASE.tab"},
    "gt_path": "tests/olga_results/OLGA4.xlsx"
}

input_olga5 = {
    "inlet": {"V_g": None, "V_L": None, "rho_g": None, "rho_L": None, "alpha_g": None, "alpha_L": None,
              "M": {"time": [0, 40], "value": [82.75, 82.75]},
              "T": {"time": None, "value": 323.15},
              "p": {"time": None, "value": None}},
    "outlet": {"V_g": None, "V_L": None, "rho_g": None, "rho_L": None, "alpha_g": None, "alpha_L": None,
               "M": {"time": None, "value": None},
               "T": {"time": None, "value": None},
               "p": {"time": None, "value": 10532000}},
    "pipe": {"h": [-124],
             "X": [26999.89859],
             "D": 0.575,
             "eps": 0.00002,
             "K": 1},
    "environment": {"T0": 278.15},
    "cfd": {"dx": 270,
            "dt_min": 0.01,
            "dt_max": 5,
            "max_time": 12000},
    "TAB": {"tab_path": "./tests/tab_data/GXDCASE.tab"},
    "gt_path": "tests/olga_results/OLGA5.xlsx"
}

input_olga6 = {
    "inlet": {"V_g": None, "V_L": None, "rho_g": None, "rho_L": None, "alpha_g": None, "alpha_L": None,
              "M": {"time": [0], "value": [2]},
              "T": {"time": None, "value": 280.15},
              "p": {"time": None, "value": None}},
    "outlet": {"V_g": None, "V_L": None, "rho_g": None, "rho_L": None, "alpha_g": None, "alpha_L": None,
               "M": {"time": None, "value": None},
               "T": {"time": None, "value": None},
               "p": {"time": None, "value": 5000000}},
    "pipe": {"h": [5000],
             "X": [49749.37186],
             "D": 0.15,
             "eps": 0.0000008,
             "K": 6.5},
    "environment": {"T0": 288.15},
    "cfd": {"dx": 400,
            "dt_min": 0.01,
            "dt_max": 5,
            "max_time": 2000},
    "TAB": {"tab_path": "./tests/tab_data/gaohanye5-60.tab"},
    "gt_path": "tests/olga_results/管道测试算例输出结果6.xlsx"
}

input_olga7 = {
    "inlet": {"V_g": None, "V_L": None, "rho_g": None, "rho_L": None, "alpha_g": None, "alpha_L": None,
              "M": {"time": [0], "value": [2]},
              "T": {"time": None, "value": 280.15},
              "p": {"time": None, "value": None}},
    "outlet": {"V_g": None, "V_L": None, "rho_g": None, "rho_L": None, "alpha_g": None, "alpha_L": None,
               "M": {"time": None, "value": None},
               "T": {"time": None, "value": None},
               "p": {"time": None, "value": 5000000}},
    "pipe": {"h": [10000],
             "X": [48989.79486],
             "D": 0.15,
             "eps": 0.0000008,
             "K": 6.5},
    "environment": {"T0": 288.15},
    "cfd": {"dx": 400,
            "dt_min": 0.01,
            "dt_max": 5,
            "max_time": 2000},
    "TAB": {"tab_path": "./tests/tab_data/gaohanye5-60.tab"},
    "gt_path": "tests/olga_results/管道测试算例输出结果7.xlsx"
}

input_olga8 = {
    "inlet": {"V_g": None, "V_L": None, "rho_g": None, "rho_L": None, "alpha_g": None, "alpha_L": None,
              "M": {"time": [0], "value": [2]},
              "T": {"time": None, "value": 280.15},
              "p": {"time": None, "value": None}},
    "outlet": {"V_g": None, "V_L": None, "rho_g": None, "rho_L": None, "alpha_g": None, "alpha_L": None,
               "M": {"time": None, "value": None},
               "T": {"time": None, "value": None},
               "p": {"time": None, "value": 5000000}},
    "pipe": {"h": [9000],
             "X": [4358.898944],
             "D": 0.15,
             "eps": 0.0000008,
             "K": 6.5},
    "environment": {"T0": 288.15},
    "cfd": {"dx": 80,
            "dt_min": 0.01,
            "dt_max": 5,
            "max_time": 2000},
    "TAB": {"tab_path": "./tests/tab_data/gaohanye5-60.tab"},
    "gt_path": "tests/olga_results/管道测试算例输出结果8.xlsx"
}

input_olga9 = {
    "inlet": {"V_g": None, "V_L": None, "rho_g": None, "rho_L": None, "alpha_g": None, "alpha_L": None,
              "M": {"time": [0], "value": [2]},
              "T": {"time": None, "value": 280.15},
              "p": {"time": None, "value": None}},
    "outlet": {"V_g": None, "V_L": None, "rho_g": None, "rho_L": None, "alpha_g": None, "alpha_L": None,
               "M": {"time": None, "value": None},
               "T": {"time": None, "value": None},
               "p": {"time": None, "value": 5000000}},
    "pipe": {"h": [10000],
             "X": [0],
             "D": 0.15,
             "eps": 0.0000008,
             "K": 6.5},
    "environment": {"T0": 288.15},
    "cfd": {"dx": 80,
            "dt_min": 0.01,
            "dt_max": 5,
            "max_time": 2000},
    "TAB": {"tab_path": "./tests/tab_data/gaohanye5-60.tab"},
    "gt_path": "tests/olga_results/管道测试算例输出结果9.xlsx"
}

input_olga10 = {
    "inlet": {"V_g": None, "V_L": None, "rho_g": None, "rho_L": None, "alpha_g": None, "alpha_L": None,
              "M": {"time": [0], "value": [2]},
              "T": {"time": None, "value": 280.15},
              "p": {"time": None, "value": None}},
    "outlet": {"V_g": None, "V_L": None, "rho_g": None, "rho_L": None, "alpha_g": None, "alpha_L": None,
               "M": {"time": None, "value": None},
               "T": {"time": None, "value": None},
               "p": {"time": None, "value": 5000000}},
    "pipe": {"h": [10000],
             "X": [48989.79486],
             "D": 0.15,
             "eps": 0.0000008,
             "K": 6.5},
    "environment": {"T0": 288.15},
    "cfd": {"dx": 400,
            "dt_min": 0.01,
            "dt_max": 5,
            "max_time": 2000},
    "TAB": {"tab_path": "./tests/tab_data/gaohanye5-60.tab"},
    "gt_path": ""
}


olga_gaohanye1 = {
    "inlet": {"V_g": None, "V_L": None, "rho_g": None, "rho_L": None, "alpha_g": None, "alpha_L": None,
              "M": {"time": None, "value": 15 },
              "T": {"time": None, "value": 280.15},
              "p": {"time": None, "value": None}},
    "outlet": {"V_g": None, "V_L": None, "rho_g": None, "rho_L": None, "alpha_g": None, "alpha_L": None,
               "M": {"time": None, "value": None},
               "T": {"time": None, "value": None},
               "p": {"time": None, "value": 5000000}},
    "pipe": {"h": [-100],
             "L": [50000],
             "D": 0.15,
             "eps": 0.0000008,
             "K": 6.5},
    "environment": {"T0": 288.15},
    "cfd": {"dx": 500,
            "dt_min": 0.01,
            "dt_max": 5,
            "max_time": 2000},
    "TAB": {"tab_path": "./tests/tab_data/gaohanye5-60.tab"},
    "gt_path": "tests/olga_results/OLGAgaohanye1.xlsx"
}


# # ====================================================================
# #                        TRA1104 1-7 标准算例
# #                用于验证程序计算结果与OLGA软件的一致性
# # ====================================================================
# tra1104_1 = {
#     "inlet": {"V_g": None, "V_L": None, "rho_g": None, "rho_L": None, "alpha_g": None, "alpha_L": None,
#               "M": {"time": [0], "value": [12]},
#               "T": {"time": None, "value": 323.15},
#               "p": {"time": None, "value": None}},
#     "outlet": {"V_g": None, "V_L": None, "rho_g": None, "rho_L": None, "alpha_g": None, "alpha_L": None,
#                "M": {"time": None, "value": None},
#                "T": {"time": None, "value": None},
#                "p": {"time": None, "value": 500000}},
#     "pipe": {"h": [0, 0], "X": [0, 4000], "D": 0.32, "eps": 0.00008, "K": 1},
#     "environment": {"T0": 279.15},
#     "cfd": {"dx": 50, "nt": 500, "cfl": 0.01, "mesh_mode": 1, "difference_mode": 3, "interp_mode": 2},
#     "output_option": {"profile": {"time": [0, 20, 40]}, "trend": {"dt": 15}},
#     "TAB": {"tab_path": "./data/test1104.tab"},
#     "save_path": {"liquid_result": "./data/%Y%m%d%H%M_{}.nc"},
#     "gt_path": "tests/test_algorithm/data/olga_results/OLGA_Tra1104-1.xlsx"
# }
#
# tra1104_2 = {
#     "inlet": {"V_g": None, "V_L": None, "rho_g": None, "rho_L": None, "alpha_g": None, "alpha_L": None,
#               "M": {"time": [0], "value": [12]},
#               "T": {"time": None, "value": 323.15},
#               "p": {"time": None, "value": None}},
#     "outlet": {"V_g": None, "V_L": None, "rho_g": None, "rho_L": None, "alpha_g": None, "alpha_L": None,
#                "M": {"time": None, "value": None},
#                "T": {"time": None, "value": None},
#                "p": {"time": None, "value": 500000}},
#     "pipe": {"h": [0, 0], "X": [0, 4000], "D": 0.32, "eps": 0.00008, "K": 5},
#     "environment": {"T0": 279.16},
#     "cfd": {"dx": 50, "nt": 500, "cfl": 0.01, "mesh_mode": 1, "difference_mode": 3, "interp_mode": 2},
#     "output_option": {"profile": {"time": [0, 20, 40]}, "trend": {"dt": 15}},
#     "TAB": {"tab_path": "./data/test1104.tab"},
#     "save_path": {"liquid_result": "./data/%Y%m%d%H%M_{}.nc"},
#     "gt_path": "tests/test_algorithm/data/olga_results/OLGA_Tra1104-2.xlsx"
# }
#
# tra1104_3 = {
#     "inlet": {"V_g": None, "V_L": None, "rho_g": None, "rho_L": None, "alpha_g": None, "alpha_L": None,
#               "M": {"time": [0], "value": [12]},
#               "T": {"time": None, "value": 279.15},
#               "p": {"time": None, "value": None}},
#     "outlet": {"V_g": None, "V_L": None, "rho_g": None, "rho_L": None, "alpha_g": None, "alpha_L": None,
#                "M": {"time": None, "value": None},
#                "T": {"time": None, "value": None},
#                "p": {"time": None, "value": 500000}},
#     "pipe": {"h": [0, 0], "X": [0, 4000], "D": 0.32, "eps": 0.00008, "K": 1},
#     "environment": {"T0": 279.16},
#     "cfd": {"dx": 50, "nt": 5000, "cfl": 0.01, "mesh_mode": 1, "difference_mode": 3, "interp_mode": 2},
#     "output_option": {"profile": {"time": [0, 20, 40]}, "trend": {"dt": 15}},
#     "TAB": {"tab_path": "./data/test1104.tab"},
#     "save_path": {"liquid_result": "./data/%Y%m%d%H%M_{}.nc"},
#     "gt_path": "tests/test_algorithm/data/olga_results/OLGA_Tra1104-3.xlsx"
# }
#
# tra1104_4 = {
#     "inlet": {"V_g": None, "V_L": None, "rho_g": None, "rho_L": None, "alpha_g": None, "alpha_L": None,
#               "M": {"time": [0], "value": [24]},
#               "T": {"time": None, "value": 323.15},
#               "p": {"time": None, "value": None}},
#     "outlet": {"V_g": None, "V_L": None, "rho_g": None, "rho_L": None, "alpha_g": None, "alpha_L": None,
#                "M": {"time": None, "value": None},
#                "T": {"time": None, "value": None},
#                "p": {"time": None, "value": 500000}},
#     "pipe": {"h": [0, 0], "X": [0, 4000], "D": 0.32, "eps": 0.00008, "K": 1},
#     "environment": {"T0": 279.15},
#     "cfd": {"dx": 50, "nt": 500, "cfl": 0.01, "mesh_mode": 1, "difference_mode": 3, "interp_mode": 2},
#     "output_option": {"profile": {"time": [0, 20, 40]}, "trend": {"dt": 15}},
#     "TAB": {"tab_path": "./data/test1104.tab"},
#     "save_path": {"liquid_result": "./data/%Y%m%d%H%M_{}.nc"},
#     "gt_path": "tests/test_algorithm/data/olga_results/OLGA_Tra1104-4.xlsx"
# }
#
# tra1104_5 = {
#     "inlet": {"V_g": None, "V_L": None, "rho_g": None, "rho_L": None, "alpha_g": None, "alpha_L": None,
#               "M": {"time": [0], "value": [12]},
#               "T": {"time": None, "value": 323.15},
#               "p": {"time": None, "value": None}},
#     "outlet": {"V_g": None, "V_L": None, "rho_g": None, "rho_L": None, "alpha_g": None, "alpha_L": None,
#                "M": {"time": None, "value": None},
#                "T": {"time": None, "value": None},
#                "p": {"time": None, "value": 1500000}},
#     "pipe": {"h": [0, 0], "X": [0, 4000], "D": 0.32, "eps": 0.00008, "K": 1},
#     "environment": {"T0": 279.15},
#     "cfd": {"dx": 50, "nt": 500, "cfl": 0.01, "mesh_mode": 1, "difference_mode": 3, "interp_mode": 2},
#     "output_option": {"profile": {"time": [0, 20, 40]}, "trend": {"dt": 15}},
#     "TAB": {"tab_path": "./data/test1104.tab"},
#     "save_path": {"liquid_result": "./data/%Y%m%d%H%M_{}.nc"},
#     "gt_path": "tests/test_algorithm/data/olga_results/OLGA_Tra1104-5.xlsx"
# }
#
# tra1104_6 = {
#     "inlet": {"V_g": None, "V_L": None, "rho_g": None, "rho_L": None, "alpha_g": None, "alpha_L": None,
#               "M": {"time": [0,2000,4000,6000,8000,10000], "value": [12.0,8.0,6.0,4.0,12.0,12.0]},
#               "T": {"time": None, "value": 323.15},
#               "p": {"time": None, "value": None}},
#     "outlet": {"V_g": None, "V_L": None, "rho_g": None, "rho_L": None, "alpha_g": None, "alpha_L": None,
#                "M": {"time": None, "value": None},
#                "T": {"time": None, "value": None},
#                "p": {"time": None, "value": 500000}},
#     "pipe": {"h": [0, 0], "X": [0, 4000], "D": 0.32, "eps": 0.00008, "K": 1},
#     "environment": {"T0": 279.15},
#     "cfd": {"dx": 50, "nt": 500, "cfl": 0.01, "mesh_mode": 1, "difference_mode": 3, "interp_mode": 2},
#     "output_option": {"profile": {"time": [0, 20, 40]}, "trend": {"dt": 15}},
#     "TAB": {"tab_path": "./data/test1104.tab"},
#     "save_path": {"liquid_result": "./data/%Y%m%d%H%M_{}.nc"},
#     "gt_path": "tests/test_algorithm/data/olga_results/OLGA_Tra1104-6.xlsx"
# }
#
# tra1104_7 = {
#     "inlet": {"V_g": None, "V_L": None, "rho_g": None, "rho_L": None, "alpha_g": None, "alpha_L": None,
#               "M": {"time": [0], "value": [12.0]},
#               "T": {"time": None, "value": 323.15},
#               "p": {"time": None, "value": None}},
#     "outlet": {"V_g": None, "V_L": None, "rho_g": None, "rho_L": None, "alpha_g": None, "alpha_L": None,
#                "M": {"time": None, "value": None},
#                "T": {"time": None, "value": None},
#                "p": {"time": [0,2000,6000,8000], "value": [500000,2000000,2000000,500000]}},
#     "pipe": {"h": [0, 0], "X": [0, 4000], "D": 0.32, "eps": 0.00008, "K": 1},
#     "environment": {"T0": 279.15},
#     "cfd": {"dx": 50, "nt": 500, "cfl": 0.01, "mesh_mode": 1, "difference_mode": 3, "interp_mode": 2},
#     "output_option": {"profile": {"time": [0, 20, 40]}, "trend": {"dt": 15}},
#     "TAB": {"tab_path": "./data/test1104.tab"},
#     "save_path": {"liquid_result": "./data/%Y%m%d%H%M_{}.nc"},
#     "gt_path": "tests/test_algorithm/data/olga_results/OLGA_Tra1104-7.xlsx"
# }
#
# tra1104_8 = {
#     "inlet": {"V_g": None, "V_L": None, "rho_g": None, "rho_L": None, "alpha_g": None, "alpha_L": None,
#               "M": {"time": [0], "value": [12.0]},
#               "T": {"time": None, "value": 323.15},
#               "p": {"time": None, "value": None}},
#     "outlet": {"V_g": None, "V_L": None, "rho_g": None, "rho_L": None, "alpha_g": None, "alpha_L": None,
#                "M": {"time": None, "value": None},
#                "T": {"time": None, "value": None},
#                "p": {"time": None, "value": 5000000}},
#     "pipe": {"h": [0, 1000], "X": [0, 4000], "D": 0.32, "eps": 0.00008, "K": 1},
#     "environment": {"T0": 279.15},
#     "cfd": {"dx": 50, "nt": 5000, "cfl": 0.001, "mesh_mode": 1, "difference_mode": 3, "interp_mode": 2},
#     "output_option": {"profile": {"time": [0, 20, 40]}, "trend": {"dt": 15}},
#     "TAB": {"tab_path": "./data/test1104.tab"},
#     "save_path": {"liquid_result": "./data/%Y%m%d%H%M_{}.nc"},
#     "gt_path": " "
# }
#
# tra1104_9 = {
#     "inlet": {"V_g": None, "V_L": None, "rho_g": None, "rho_L": None, "alpha_g": None, "alpha_L": None,
#               "M": {"time": [0], "value": [12.0]},
#               "T": {"time": None, "value": 323.15},
#               "p": {"time": None, "value": None}},
#     "outlet": {"V_g": None, "V_L": None, "rho_g": None, "rho_L": None, "alpha_g": None, "alpha_L": None,
#                "M": {"time": None, "value": None},
#                "T": {"time": None, "value": None},
#                "p": {"time": None, "value": 5000000}},
#     "pipe": {"h": [0, -1000], "X": [0, 4000], "D": 0.32, "eps": 0.00008, "K": 1},
#     "environment": {"T0": 279.15},
#     "cfd": {"dx": 51.5, "nt": 5000, "cfl": 0.005, "mesh_mode": 1, "difference_mode": 3, "interp_mode": 2},
#     "output_option": {"profile": {"time": [0, 20, 40]}, "trend": {"dt": 15}},
#     "TAB": {"tab_path": "./data/test1104.tab"},
#     "save_path": {"liquid_result": "./data/%Y%m%d%H%M_{}.nc"},
#     "gt_path": "tests/test_algorithm/data/olga_results/OLGA_Tra1104-9.xlsx"
# }
#
# tra1104_10 = {
#     "inlet": {"V_g": None, "V_L": None, "rho_g": None, "rho_L": None, "alpha_g": None, "alpha_L": None,
#               "M": {"time": [0], "value": [12.0]},
#               "T": {"time": None, "value": 323.15},
#               "p": {"time": None, "value": None}},
#     "outlet": {"V_g": None, "V_L": None, "rho_g": None, "rho_L": None, "alpha_g": None, "alpha_L": None,
#                "M": {"time": None, "value": None},
#                "T": {"time": None, "value": None},
#                "p": {"time": None, "value": 5000000}},
#     "pipe": {"h": [0, -200], "X": [0, 4000], "D": 0.32, "eps": 0.00008, "K": 1},
#     "environment": {"T0": 279.15},
#     "cfd": {"dx": 50, "nt": 5000, "cfl": 0.01, "mesh_mode": 1, "difference_mode": 3, "interp_mode": 2},
#     "output_option": {"profile": {"time": [0, 20, 40]}, "trend": {"dt": 15}},
#     "TAB": {"tab_path": "./data/test1104.tab"},
#     "save_path": {"liquid_result": "./data/%Y%m%d%H%M_{}.nc"},
#     "gt_path": "tests/test_algorithm/data/olga_results/OLGA_Tra1104-10.xlsx"
# }